<?php

namespace app\admin\validate;

use think\Validate;

class Node extends Validate
{
    //验证规则
    protected $rule = [
        'menu' => 'require',
        'node_name|权限名称' => 'require',
        'order|排序' => 'require',
        'pid|上级权限' => 'require',
    ];

    //验证场景  添加场景、修改场景、删除场景
    protected $scene = [
        'add' => ['menu', 'node_name', 'order', 'pid'],//  添加场景
    ];
}